<template>
  <div id="app" class="lm-app">
    <router-view />
    <div class="dialog-masker" v-if="isShowMasker"></div>
  </div>
</template>

<script>
import { mapState } from 'vuex';
export default {

  data(){
    return {

    };
  },
  computed: {
    ...mapState({
      pageTitle: state => state.pageTitle,
      sublink: state=> state.sublink,
      isShowMasker: state => state.showMasker
    })
    
  },
  methods: {
    goBack(){
      history.go(-1);
    }
  },
  mounted(){
    console.log(this.isShowMasker)
  }
};
</script>

<style lang="scss">
$header-height: 64px;
$header-status-bar-height: 10px;

.lm-app {
  position: relative;
}
.app-header {
  height: $header-height;
  padding-top: $header-status-bar-height;

  > div {
    height: $header-height - $header-status-bar-height;
    line-height: $header-height - $header-status-bar-height;
    position: relative;
  }

  background-image: linear-gradient(270deg, #CD4242 0%, #EA9B77 100%, #EE9A7F 100%);
}

.app-header-title {
  font-size: 18px;
  color: #fff;
  text-align: center;
}

.app-header-router-link {
  position: absolute;
  left: 12px;
  bottom: 0;
  font-size: 0;
  -webkit-tap-heighlight-color: transparent;
  &:visited{
    text-decoration: none;
    color: #fff;
  }
}

.app-header-sublink {
  position: absolute;
  right: 16px;
  font-size: 15px;
  bottom: 14px;
  line-height: 1.5;
  color: #fff;
}

.app-body {
  height: calc(100% - 64px);
}

.dialog-masker {
  width: 100%;
  height: 100%;
  position: fixed;
  left: 0;
  top: 0;
  background-color: rgba(0, 0, 0, .5);
  z-index: 100;
}
</style>
